<template>
  <div id="updateDialog">
    <el-dialog class="box" title="配置规则" :visible.sync="updateDialogShow" :before-close="handleClose">
      <div class="Dtitle">
        <span style="font-size: 14px;font-weight: 700;color: #606266; line-height: 40px;padding: 0 12px 0 0;">测点名称:</span>{{this.viewPoint.name}}
      </div>
      <div class="alertForm">
        <el-form :inline="true" class="addMessage" :model="updaterule" ref="form" label-width="90px">
          <el-form-item class="alertMessage" label="预警阈值:">
            <el-input class="smallMessage" v-model="updaterule.data.threshold" placeholder="请输入预警阈值"></el-input>
          </el-form-item>
          <el-form-item class="alertMessage" label="阈值单位:">
            <el-select class="smallMessage" clearable v-model="updaterule.data.period" placeholder="请选择">
              <el-option
                v-for="item in cycleOptions"
                :key="item.value"
                :label="item.label"
                :value="item.value">
              </el-option>
            </el-select>
          </el-form-item>
          <el-form-item class="alertTextarea" style="height: auto" label="预警内容:">
            <el-input type="textarea" :autosize="{ minRows: 2, maxRows: 2}" v-model="updaterule.data.warn_cont" class="cityMessage" placeholder="请输入预警内容"></el-input>
          </el-form-item>
        </el-form>
      </div>
      <hr>
      <div v-if="this.viewPoint.type === 'analog'" style="overflow: auto;height: 200px;">
        <div v-if="this.viewPoint.type === 'analog' && this.viewPoint.rule_json.length !== 0">
          <div v-if="this.analogConfigShow === false" class="content" >
            <el-button class="tableIcon" title="添加" type="text" size="small" @click="addConfiganalogShow()"><i class="el-icon-plus"></i></el-button>
          </div>
          <div class="content" v-if="this.analogConfigShow !== false" >
            <el-table class="addSafeTable" :data="digitConfig">
              <el-table-column class="tablePadding" width="600px" prop="name">
                <template slot-scope="scope">
                  <div class="block">
                    <el-row>
                      <el-col :span="2">
                        <div class="grid-content bg-purple-light ">{{scope.$index + 1}} </div>
                      </el-col>
                      <el-col :span="8">
                        <div class="grid-content bg-purple-light">
                          <el-row>
                            <el-col :span="8"><div class="grid-content bg-purple">事件等级</div></el-col>
                            <el-col :span="16">
                              <div class="grid-content bg-purple-light">
                                <el-select  placeholder="请选择" clearable :span="4" v-model="digitConfig[scope.$index].value">
                                  <el-option
                                    v-for="item in analogoptions"
                                    :key="item.value"
                                    :label="item.label"
                                    :value="item.value">
                                  </el-option>
                                </el-select>
                              </div>
                            </el-col>
                          </el-row>
                        </div>
                      </el-col>
                      <el-col :span="7">
                        <div class="grid-content bg-purple">
                          <el-row>
                            <el-col :span="8"><div class="grid-content bg-purple">下限</div></el-col>
                            <el-col :span="15">
                              <div class="grid-content bg-purple-light">
                                <el-input  placeholder="" v-model="digitConfig[scope.$index].end"></el-input>
                              </div>
                            </el-col>
                          </el-row>
                        </div>
                      </el-col>
                      <el-col :span="7">
                        <div class="grid-content bg-purple-light">
                          <el-row>
                            <el-col :span="8"><div class="grid-content bg-purple">上限</div></el-col>
                            <el-col :span="16">
                              <div class="grid-content bg-purple-light">
                                <el-input  placeholder="" v-model="digitConfig[scope.$index].begin"></el-input>
                              </div>
                            </el-col>
                          </el-row>
                        </div>
                      </el-col>
                    </el-row>
                  </div>
                </template>
              </el-table-column>
              <el-table-column class="tablePadding">
                <template  slot-scope="scope">
                  <el-button class="tableIcon" title="添加" type="text" size="small" @click="addConfig(scope.$index)" v-if="scope.$index !== 9"><i class="el-icon-plus"></i></el-button>
                  <el-button class="tableIcon" title="删除" type="text" size="small" @click="deleteConfigRow(scope.$index)"><i class="el-icon-minus"></i></el-button>
                </template>
              </el-table-column>
            </el-table>
          </div>
        </div>
        <div v-if="this.viewPoint.type === 'analog' && this.viewPoint.rule_json.length === 0">
          <div v-if="this.analogConfigNullShow === false" class="content" >
            <el-button class="tableIcon" title="添加" type="text" size="small" @click="addConfiganalognoShow()"><i class="el-icon-plus"></i></el-button>
          </div>
          <div class="content" v-if="this.analogConfigNullShow !== false">
            <el-table class="addSafeTable" :data="digitConfigNull">
              <el-table-column class="tablePadding" width="600px" prop="name">
                <template slot-scope="scope">
                  <div class="block">
                    <el-row>
                      <el-col :span="2">
                        <div class="grid-content bg-purple-light ">{{scope.$index + 1}} </div>
                      </el-col>
                      <el-col :span="8">
                        <div class="grid-content bg-purple-light">
                          <el-row>
                            <el-col :span="8"><div class="grid-content bg-purple">事件等级</div></el-col>
                            <el-col :span="16">
                              <div class="grid-content bg-purple-light">
                                <el-select  placeholder="请选择" clearable :span="4" v-model="digitConfigNull[scope.$index].value">
                                  <el-option
                                    v-for="item in analogoptions"
                                    :key="item.value"
                                    :label="item.label"
                                    :value="item.value">
                                  </el-option>
                                </el-select>
                              </div>
                            </el-col>
                          </el-row>
                        </div>
                      </el-col>
                      <el-col :span="7">
                        <div class="grid-content bg-purple">
                          <el-row>
                            <el-col :span="8"><div class="grid-content bg-purple">下限</div></el-col>
                            <el-col :span="15">
                              <div class="grid-content bg-purple-light">
                                <el-input  placeholder="" v-model="digitConfigNull[scope.$index].end"></el-input>
                              </div>
                            </el-col>
                          </el-row>
                        </div>
                      </el-col>
                      <el-col :span="7">
                        <div class="grid-content bg-purple-light">
                          <el-row>
                            <el-col :span="8"><div class="grid-content bg-purple">上限</div></el-col>
                            <el-col :span="16">
                              <div class="grid-content bg-purple-light">
                                <el-input  placeholder="" v-model="digitConfigNull[scope.$index].begin"></el-input>
                              </div>
                            </el-col>
                          </el-row>
                        </div>
                      </el-col>
                    </el-row>
                  </div>
                </template>
              </el-table-column>
              <el-table-column class="tablePadding">
                <template  slot-scope="scope">
                  <el-button class="tableIcon" title="添加" type="text" size="small" @click="addConfigno(scope.$index)" v-if="scope.$index !== 9" ><i class="el-icon-plus" ></i></el-button>
                  <el-button class="tableIcon" title="删除" type="text" size="small" @click="deleteConfigRowno(scope.$index)" ><i class="el-icon-minus"></i></el-button>
                </template>
              </el-table-column>
            </el-table>
          </div>
        </div>
        <!--类型：degit的时候用-->
      </div>

      <div v-if="this.viewPoint.type === 'digit'" style="overflow: auto;height: 200px;">
        <div v-if="this.viewPoint.type === 'digit'&& this.viewPoint.rule_json.length !== 0">
          <div v-if="this.digitConfigShow === false" class="content" >
            <el-button class="tableIcon" title="添加" type="text" size="small" @click="addConfigdigitShow()"><i class="el-icon-plus"></i></el-button>
          </div>
          <div v-if="this.digitConfigShow !== false" class="content" >
            <el-table class="addSafeTable" :data="digitConfig">
              <el-table-column class="tablePadding" width="600px" prop="name">
                <template slot-scope="scope">
                  <div class="block">
                    <el-row>
                      <el-col :span="2">
                        <div class="grid-content bg-purple-light ">{{scope.$index + 1}} </div>
                      </el-col>
                      <el-col :span="11">
                        <div class="grid-content bg-purple-light">
                          <el-row>
                            <el-col :span="6"><div class="grid-content bg-purple">事件等级</div></el-col>
                            <el-col :span="18">
                              <div class="grid-content bg-purple-light">
                                <el-select placeholder="请选择" :span="4" clearable v-model="digitConfig[scope.$index].value">
                                  <el-option
                                    v-for="item in options"
                                    :key="item.value"
                                    :label="item.label"
                                    :value="item.value">
                                  </el-option>
                                </el-select>
                              </div>
                            </el-col>
                          </el-row>
                        </div>
                      </el-col>
                      <el-col :span="11">
                        <div class="grid-content bg-purple">
                          <el-row>
                            <el-col :span="7"><div class="grid-content bg-purple">原始值</div></el-col>
                            <el-col :span="17">
                              <div class="grid-content bg-purple-light">
                                <el-select  placeholder="请选择" :span="4" clearable @change="queryDigitType" v-model="digitConfig[scope.$index].begin" >
                                  <el-option
                                    v-for="items in digitOption"
                                    :key="items.value"
                                    :label="items.label"
                                    :value="items.value">
                                  </el-option>
                                </el-select>
                              </div>
                            </el-col>
                          </el-row>
                        </div>
                      </el-col>
                    </el-row>
                  </div>
                </template>
              </el-table-column>
              <el-table-column class="tablePadding">
                <template  slot-scope="scope">
                  <el-button class="tableIcon" title="添加" type="text" size="small" @click="addConfigdigit(scope.$index)" v-if="scope.$index !== 1"><i class="el-icon-plus"></i></el-button>
                  <el-button class="tableIcon" title="删除" type="text" size="small" @click="deleteConfigdigitRow(scope.$index)"><i class="el-icon-minus"></i></el-button>
                </template>
              </el-table-column>
            </el-table>
          </div>
        </div>
        <div v-if="this.viewPoint.type === 'digit' && this.viewPoint.rule_json.length === 0">
          <div v-if="this.digitConfigNullShow === false" class="content" >
            <el-button class="tableIcon" title="添加" type="text" size="small" @click="addConfigdigitnoShow()"><i class="el-icon-plus"></i></el-button>
          </div>
          <div v-if="this.digitConfigNullShow !== false" class="content" >
            <el-table class="addSafeTable two" :data="digitConfigNull">
              <el-table-column class="tablePadding" width="600px" prop="name">
                <template slot-scope="scope">
                  <div class="block">
                    <el-row>
                      <el-col :span="2">
                        <div class="grid-content bg-purple-light ">{{scope.$index + 1}} </div>
                      </el-col>
                      <el-col :span="11">
                        <div class="grid-content bg-purple-light">
                          <el-row>
                            <el-col :span="6"><div class="grid-content bg-purple">事件等级</div></el-col>
                            <el-col :span="18">
                              <div class="grid-content bg-purple-light">
                                <el-select placeholder="请选择" clearable :span="4" v-model="digitConfigNull[scope.$index].value">
                                  <el-option
                                    v-for="item in options"
                                    :key="item.value"
                                    :label="item.label"
                                    :value="item.value">
                                  </el-option>
                                </el-select>
                              </div>
                            </el-col>
                          </el-row>
                        </div>
                      </el-col>
                      <el-col :span="11">
                        <div class="grid-content bg-purple">
                          <el-row>
                            <el-col :span="7"><div class="grid-content bg-purple">原始值</div></el-col>
                            <el-col :span="17">
                              <div class="grid-content bg-purple-light">
                                <el-select  placeholder="请选择" :span="4" clearable @change="queryDigitType" v-model="digitConfigNull[scope.$index].begin" >
                                  <el-option
                                    v-for="items in digitOption"
                                    :key="items.value"
                                    :label="items.label"
                                    :value="items.value">
                                  </el-option>
                                </el-select>
                              </div>
                            </el-col>
                          </el-row>
                        </div>
                      </el-col>
                    </el-row>
                  </div>
                </template>
              </el-table-column>
              <el-table-column class="tablePadding">
                <template  slot-scope="scope">
                  <el-button class="tableIcon" title="添加" type="text" size="small" @click="addConfigdigitno(scope.$index)" v-if="scope.$index !== 1"><i class="el-icon-plus"></i></el-button>
                  <el-button class="tableIcon" title="删除" type="text" size="small" @click="deleteConfigdigitRowno(scope.$index)" ><i class="el-icon-minus"></i></el-button>
                </template>
              </el-table-column>
            </el-table>
          </div>
        </div>
        <!--类型：degit rule_json为空的时候用-->
      </div>

      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="updateRule" v-if="this.analogConfigShow !== false && this.digitConfigShow !== false">保存</el-button>
        <el-button type="primary" @click="updateRuleanalog" v-if="this.analogConfigShow === false">保存</el-button>
        <el-button type="primary" @click="updateRuledigit" v-if="this.digitConfigShow === false">保存</el-button>
        <el-button type="info" @click="handleClose" >取 消</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
  import axios from 'axios'
  export default {
    props: {
      viewPoint: {},
      configPid: '',
      index: ''
    },
    components: {
    },
    data() {
      return {
        restatus: '更新',
        digitConfig: [
          { value: '0', raw_value: '0', begin: '', end: '' }
          /*
          { value: '1', raw_value: '1', begin: '', end: '' },
          { value: '2', raw_value: '2', begin: '', end: '' },
          { value: '3', raw_value: '3', begin: '', end: '' },
          { value: '4', raw_value: '4', begin: '', end: '' },
          { value: '5', raw_value: '5', begin: '', end: '' },
          { value: '6', raw_value: '6', begin: '', end: '' }*/
        ],
        digitConfigShow: true,
        analogConfigShow: true,
        // 事件等级
        // 事件类型
        submitType: {
          access_token: window.localStorage.getItem('access_token'),
          type: 'event_type_get2'
        },
        submitCycle: {
          access_token: localStorage.getItem('access_token'),
          type: 'period_value_get'
        },
        options: [],
        cycleOptions: [],
        analogoptions: [],
        ruleOption: [], // 当前数据的rule_json
        // 原始值获取
        getDigit: {
          access_token: 'token:12345XXXX',
          type: 'object_station_digit_get',
          pid: this.configPid,
          data: {
            cid: 'jmkt0001',
            oid: '4'
          }
        },
        changeNumber: false,
        digitOption: [],
        digitTypeNumber: [],
        originalOption: [], // 原始值
        updateDialogFalse: false,
        isIndeterminate: true,
        type: 'degit',
        props: {
          label: 'name',
          children: 'zones'
        },
        pointList: [
          { eventClass: '严重', topLine: '122', bottomLine: '3644' },
          { eventClass: '严重', topLine: '122', bottomLine: '3644' },
          { eventClass: '严重', topLine: '122', bottomLine: '3644' },
          { eventClass: '严重', topLine: '122', bottomLine: '3644' }
        ],
        // 修改配置规则
        updaterule: {
          access_token: localStorage.getItem('access_token'),
          type: 'object_station_rule_mod',
          pid: this.configPid,
          data: {
            cid: 'jmkt0001',
            oid: '4',
            type: this.viewPoint.type,
            rule_json: [],
            threshold: '',
            period: '',
            warn_cont: ''
          }
        },
        digitConfigNull: [{
          begin: '',
          end: '',
          label: '',
          raw_label: '',
          raw_value: '',
          rule_id: 1,
          value: ''
        }],
        digitConfigNullShow: false,
        analogConfigNullShow: false
      }
    },
    mounted() {
      console.log(333, this.viewPoint)
      this.queryDigitType()
    },
    created() {
      this.updateDialogShow = true
      this.queryEventType()
      this.queryEventCycle()
      this.queryDigitType()
      this.ruleOption = this.formArr(this.viewPoint.rule_json)
      this.updaterule.data.threshold = this.viewPoint.threshold
      this.updaterule.data.period = this.viewPoint.period
      this.updaterule.data.warn_cont = this.viewPoint.warn_cont
      if (this.ruleOption.length !== 0) {
        this.digitConfig = []
        for (let i = 0; i < this.ruleOption.length; i++) {
          this.digitConfig.push({ value: '', raw_value: '', begin: '', end: '' })
          this.digitConfig[i].value = this.ruleOption[i].value
          this.digitConfig[i].raw_value = this.ruleOption[i].raw_value
          this.digitConfig[i].begin = this.ruleOption[i].begin
          this.digitConfig[i].end = this.ruleOption[i].end
        }
      }
    },
    methods: {
      // 配置规则anlong
      addConfig() {
        if (this.digitConfig.length < 10) {
          this.digitConfig.push({ value: '' })
        }
      },
      deleteConfigRow(index) {
        if (this.digitConfig.length > 1) {
          this.digitConfig.splice(index, 1)
        } else {
          this.analogConfigShow = false
        }
      },
      addConfigno() {
        if (this.digitConfigNull.length < 10) {
          this.digitConfigNull.push({ value: '' })
        }
      },
      deleteConfigRowno(index) {
        /*
        if (this.digitConfigNull.length > 1) {
          this.digitConfigNull.splice(index, 1)
        }*/
        if (this.digitConfigNull.length > 1) {
          this.digitConfigNull.splice(index, 1)
          // this.queryDigitType()
        } else {
          this.digitConfigNull[0].value = ''
          this.digitConfigNull[0].begin = ''
          this.analogConfigNullShow = false
        }
      },
      addConfigdigitnoShow() {
        this.queryDigitType()
        this.digitConfigNullShow = true
      },
      // 配置规则digit
      addConfigdigit() {
        if (this.digitConfig.length < this.digitTypeNumber) {
          this.digitConfig.push({ value: '' })
        }
      },
      deleteConfigdigitRow(index) {
        if (this.digitConfig.length > 1) {
          this.digitConfig.splice(index, 1)
        } else {
          this.digitConfigShow = false
        }
      },
      addConfigdigitShow() {
        this.digitConfigShow = true
      },
      addConfiganalogShow() {
        this.analogConfigShow = true
      },
      // 配置规则digit null
      addConfigdigitno(index) {
        if (this.digitConfigNull.length < this.digitTypeNumber) {
          this.digitConfigNull.push({ value: '' })
        }
      },
      deleteConfigdigitRowno(index) {
        if (this.digitConfigNull.length > 1) {
          this.digitConfigNull.splice(index, 1)
          this.queryDigitType()
        } else {
          this.digitConfigNull[0].value = ''
          this.digitConfigNull[0].begin = ''
          this.digitConfigNullShow = false
        }
      },
      addConfigdigitnoShow() {
        this.queryDigitType()
        this.digitConfigNullShow = true
      },
      addConfiganalognoShow() {
        this.analogConfigNullShow = true
      },
      // 状态量原始值下拉筛选
      digitChange() {
        if (this.digitConfigNullShow === true) {
          for (let a = 0; a < this.digitConfigNull.length; a++) {
            for (let b = 0; b < this.digitOption.length; b++) {
              if (this.digitOption[b].value === this.digitConfigNull[a].begin) {
                this.digitOption.splice(b, 1)
              }
            }
          }
        } else {
          for (let a = 0; a < this.digitConfig.length; a++) {
            for (let b = 0; b < this.digitOption.length; b++) {
              if (this.digitOption[b].value === this.digitConfig[a].begin) {
                this.digitOption.splice(b, 1)
              }
            }
          }
        }
      },
      // 从新组装label 和 value
      formArr(arr) {
        var newarr = []
        for (let i = 0; i < arr.length; i++) {
          var obj = {}
          var def = arr[i]
          obj['label'] = def['label']
          obj['value'] = def['value']
          obj['raw_label'] = def['raw_label']
          obj['raw_value'] = def['raw_value']
          obj['begin'] = def['begin']
          obj['end'] = def['end']
          newarr.push(obj)
        }
        return newarr
      },
      // 事件类型
      queryEventType() {
        axios.post('/project', this.submitType, {
          headers: {
            'Content-Type': 'application/x-www-form-urlencoded'
          }
        }).then((res) => {
          this.options = res.data.datas
          this.analogoptions = this.options
        })
          .catch(function(error) {
            console.log(error)
          })
      },
      queryEventCycle() {
        axios.post('/project', this.submitCycle, {
          headers: {
            'Content-Type': 'application/x-www-form-urlencoded'
          }
        }).then((res) => {
          this.cycleOptions = res.data.data
        })
          .catch(function(error) {
            console.log(error)
          })
      },
      // 原始类型
      queryDigitType() {
        this.getDigit.data.cid = this.viewPoint.cid
        this.getDigit.data.oid = this.viewPoint.oid
        axios.post('/project', this.getDigit, {
          headers: {
            'Content-Type': 'application/x-www-form-urlencoded'
          }
        }).then((res) => {
          this.digitOption = res.data.data
          this.digitTypeNumber = res.data.data.length
          if (this.changeNumber === true) {
            this.digitChange()
          }
          this.changeNumber = true
        })
          .catch(function(error) {
            console.log(error)
          })
      },
      // 修改配置规则
      updateRule() {
        this.updaterule.data.cid = this.viewPoint.cid
        this.updaterule.data.oid = this.viewPoint.oid
        if (this.viewPoint.type === 'digit' && this.viewPoint.rule_json.length !== 0) {
          this.updaterule.data.rule_json = this.digitConfig
        } else {
          this.updaterule.data.rule_json = this.digitConfigNull
        }
        axios.post('/project', this.updaterule, {
          headers: {
            'Content-Type': 'application/x-www-form-urlencoded'
          }
        }).then((res) => {
          if (res.data.errcode === '00000') {
            this.handleClose()
            this.restar()
            this.$message({
              type: 'success',
              message: '保存成功'
            })
          }
        })
          .catch((error) => {
            this.$message.error(error.data.errmsg)
          })
      },
      // 修改配置规则 状态为analog为空时
      updateRuleanalog() {
        this.updaterule.data.cid = this.viewPoint.cid
        this.updaterule.data.oid = this.viewPoint.oid
        this.updaterule.data.rule_json = []
        axios.post('/project', this.updaterule, {
          headers: {
            'Content-Type': 'application/x-www-form-urlencoded'
          }
        }).then((res) => {
          if (res.data.errcode === '00000') {
            this.handleClose()
            this.restar()
            this.$message({
              type: 'success',
              message: '保存成功'
            })
          }
        })
          .catch((error) => {
            this.$message.error(error.data.errmsg)
          })
      },
      // 修改配置规则 状态为digit为空时
      updateRuledigit() {
        this.updaterule.data.cid = this.viewPoint.cid
        this.updaterule.data.oid = this.viewPoint.oid
        this.updaterule.data.rule_json = []
        axios.post('/project', this.updaterule, {
          headers: {
            'Content-Type': 'application/x-www-form-urlencoded'
          }
        }).then((res) => {
          if (res.data.errcode === '00000') {
            this.handleClose()
            this.restar()
            this.$message({
              type: 'success',
              message: '保存成功'
            })
          }
        })
          .catch((error) => {
            this.$message.error(error.data.errmsg)
          })
      },
      handleCheckAllChange(val) {
        this.isIndeterminate = false
      },
      handleCheckedCitiesChange(value) {
        const checkedCount = value.length
        this.checkAll = checkedCount === this.details.length
        this.isIndeterminate = checkedCount > 0 && checkedCount < this.details.length
      },
      // 子组件传值
      handleClose() {
        const dialogShow = this.updateDialogFalse // 所需要传的值
        this.$emit('giveFalse', dialogShow) // 传值的参数
        console.log(dialogShow)
      },
      // 保存成功返回测点列表
      restar() {
        this.$emit('rerule', this.restatus)
      }
    }
  }
</script>

<style rel="stylesheet/scss" lang="scss" scoped>
  /*****************第一层弹窗*****************/
  .testColor{
    padding: 0;
    color: #fff;
  }
  .Dtitle{
    font-size:14px;
    font-family:MicrosoftYaHei;
    font-weight:400;
    color:rgba(50,56,66,1);
    width: 300px;
    height: 40px;
    margin-left: 17px;
    margin-top: -8px;
  }
  .content{
    width: 710px;
    height: 50px;
    background-color: #F0F3F5;
    margin-top: 10px;
    margin-left: 10px;
    line-height: 50px;
    text-align: center;
  }
  .rightLine{
    font-size: 16px;
    color: #25B6C7;
    font-weight: bold;
    cursor: pointer;
  }
  .tableIcon{
    color: #0072F3;
    i{
      font-size: 22px;
    }
  }
  /deep/ .addEditIcon {
    color: #0072F3;
    font-size: 16px;
    cursor: pointer;
  }
  /deep/ .el-range-editor--small.el-input__inner {
    height: 30px;
    width: 385px;
  }
  /deep/ .addSafeTable > .el-table__header-wrapper{
    height: 0px;
  }
  /*****************第一层弹窗*****************/
  /deep/ .box > .el-dialog{
    width: 750px;
    min-height: 300px;
    max-height: 470px;
    /*overflow: auto;*/
    margin-top: 20vh !important;
    border-radius: 4px;
  }
  /*****************第一层弹窗头部*****************/
  /deep/ .box > .el-dialog > .el-dialog__header{
    width: 750px;
    height: 39px;
    line-height: 43px;
    padding: 0;
    text-indent: 20px;
    font-weight: bolder;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    background-color: #e3e6ee;
  }
  /deep/ .box > .el-dialog > .el-dialog__header > .el-dialog__headerbtn{
    top: 12px;
  }
  /deep/ .box > .el-dialog > .el-dialog__header > .el-dialog__headerbtn > i{
    font-size: 18px;
    font-weight: bolder;
  }
  /*****************第一层弹窗内容*****************/

    .alertMessage {
      /deep/ label{
        font-weight:200;
      }
  }

  .alertTextarea{
      /deep/ label{
        font-weight:200;
      }
  }

  /deep/ .box > .el-dialog > .el-dialog__body{
    padding: 1px 0 0 10px ;
    min-height: 200px;
    line-height: 30px;
    max-height: 322px;
    /*overflow: auto;*/
    margin-top: 20px;
    margin-bottom: 20px;
  }
  /deep/ .box > .el-dialog > .el-dialog__body > .el-form > .el-form-item{
    margin-bottom: 0;
  }
  /deep/ .box > .el-dialog > .el-dialog__body > .el-form > .el-form-item > .el-form-item__label{
    color: #69727E;
    font-weight: normal;
  }
  /deep/ .box > .el-dialog > .el-dialog__body > .el-form > .el-form-item > .el-form-item__content > .el-input > .el-input__inner{
    width: 610px;
    height: 30px;
  }
  /deep/ .box > .el-dialog > .el-dialog__body > .alertForm > .addMessage > .alertTextarea > .el-form-item__content {
    width: 620px;
  }
  /deep/ .alertMessage {
    margin-bottom: 0px;
  }
  /deep/ .alertTextarea {
    margin-bottom: 5px;
  }
  /deep/ .alertMessage > .el-form-item__content {
    width: 258px;
  }
  /deep/ .smallMessage {
    width: 258px;
  }
  /deep/ .smallMessage > .el-input__inner {
    padding: 0px 15px;
  }
  /deep/ .smallMessage > .el-input > .el-input__inner {
    padding: 0px 15px;
  }
  /deep/ .cityMessage > .el-textarea__inner {
    resize: none;
  }
  /*****************第一层弹窗底部*****************/
  /deep/ .box > .el-dialog > .el-dialog__footer{
    border-top: 1px solid #e3e6ee;
  }
  /*****************底部按钮*****************/
  /deep/ .dialog-footer{
    width: 100%;
    /*padding-top: 8px;*/
  }
  /deep/ .dialog-footer > .el-button{
    width: 80px;
    height: 30px;
    padding: 0;
  }
  /deep/ .el-input__inner {
    -webkit-appearance: none;
    background-color: #fff;
    background-image: none;
    border-radius: 4px;
    border: 1px solid #dcdfe6;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    color: #606266;
    display: inline-block;
    font-size: inherit;
    height: 30px;
    line-height: 30px;
    outline: 0;
    padding: 0 27px;
    -webkit-transition: border-color .2s cubic-bezier(.645,.045,.355,1);
    transition: border-color .2s cubic-bezier(.645,.045,.355,1);
    width: 100%;
  }
  /deep/ .el-icon-minus {
    color: #D05133;
  }
  #updateDialog /deep/ .el-table tr {
    background-color: #F0F3F5;
  }
  #updateDialog /deep/  .el-table td {
    border-bottom: 10px solid #fff;
  }
  #updateDialog /deep/  .el-table--group::after, .el-table--border::after, .el-table::before {
    content: '';
    position: absolute;
    background-color: #fff;
    z-index: 1;
  }


</style>
